
println("Testing Slice..")

test_mesh = HomogenousMesh(Point{3,Float64}[Point{3,Float64}(0.0,0.0,10.0),
 Point{3,Float64}(0.0,10.0,10.0),
 Point{3,Float64}(0.0,0.0,0.0),
 Point{3,Float64}(0.0,10.0,0.0),
 Point{3,Float64}(10.0,0.0,10.0),
 Point{3,Float64}(10.0,10.0,10.0),
 Point{3,Float64}(10.0,0.0,0.0),
 Point{3,Float64}(10.0,10.0,0.0),
],Face{3,Int,0}[
 Face{3,Int,0}(3,7,5)
 Face{3,Int,0}(1,3,5)
 Face{3,Int,0}(1,2,3)
 Face{3,Int,0}(3,2,4)
 Face{3,Int,0}(1,5,6)
 Face{3,Int,0}(2,1,6)
 Face{3,Int,0}(4,8,3)
 Face{3,Int,0}(3,8,7)
 Face{3,Int,0}(7,8,6)
 Face{3,Int,0}(5,7,6)
 Face{3,Int,0}(2,6,4)
 Face{3,Int,0}(4,6,8)]
)
s = slice(test_mesh, [1.0, 2.0])

let
    @test length(s) == 2
    @test length(s[1]) == length(s[2]) == 1
    exp1 = [([0.0,1.0],[0.0,0.0]),([0.0,0.0],[1.0,0.0]),
                      ([1.0,0.0],[10.0,0.0]),([10.0,0.0],[10.0,1.0]),
                      ([10.0,1.0],[10.0,10.0]),([10.0,10.0],[1.0,10.0]),
                      ([1.0,10.0],[0.0,10.0]),([0.0,10.0],[0.0,1.0])]
    exp2 = [([0.0,2.0],[0.0,0.0]),([0.0,0.0],[2.0,0.0]),
                      ([2.0,0.0],[10.0,0.0]),([10.0,0.0],[10.0,2.0]),
                      ([10.0,2.0],[10.0,10.0]),([10.0,10.0],[2.0,10.0]),
                      ([2.0,10.0],[0.0,10.0]),([0.0,10.0],[0.0,2.0])]
    @test length(s[1][1]) == length(exp1)
    @test length(s[2][1]) == length(exp2)
end
